passthrough/PCI: replace improper uses of pci_find_next_cap()
authorJan Beulich <jbeulich@suse.com>
Tue, 20 Nov 2012 07:58:31 +0000 (08:58 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 20 Nov 2012 07:58:31 +0000 (08:58 +0100)
commit2cb5154f089c67003268c54f608169ab7c9e8d39
tree35a9475018f6f24493e2bac98aee15af2e6ae9be
parent11ab183655cea5088be06c6ef710ecd134b669d6
passthrough/PCI: replace improper uses of pci_find_next_cap()

Using pci_find_next_cap() without prior pci_find_cap_offset() is bogus
(and possibly wrong, given that the latter doesn't check the
PCI_STATUS_CAP_LIST flag, which so far was checked in an open-coded way
only for the non-bridge case).

Once at it, fold the two calls into one, as we need its result in any
case.

Question is whether, without any caller left, pci_find_next_cap()
should be purged as well.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Xiantao Zhang <xiantao.zhang@intel.com>
xen/drivers/passthrough/pci.c